<button class="list-group-item list-group-item-action d-flex align-items-center p-2 border-top-0 border-start-0 border-end-0 border-bottom" role="menuitem" (click)="toggleItem($event)" [disabled]="disabled">
  <div class="selected-icon me-1">
    @if (isChecked()) {
      <svg fill="currentColor" class="buttonicon-sm bi-check">
        <use xlink:href="assets/bootstrap-icons.svg#check"/>
      </svg>
    }
    @if (isPartiallyChecked()) {
      <svg fill="currentColor" class="buttonicon-sm bi-dash">
        <use xlink:href="assets/bootstrap-icons.svg#dash"/>
      </svg>
    }
    @if (isExcluded()) {
      <svg fill="currentColor" class="buttonicon-sm bi-x">
        <use xlink:href="assets/bootstrap-icons.svg#x"/>
      </svg>
    }
  </div>
  <div class="me-1">
    @if (isTag) {
      <pngx-tag [tag]="item" [clickable]="false"></pngx-tag>
    } @else {
      <small>{{item.name}}</small>
    }
  </div>
  @if (!hideCount) {
    <div class="badge bg-light text-dark rounded-pill ms-auto me-1">{{count ?? item.document_count}}</div>
  }
</button>
